home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
TURBOCU1.LZH
/
TCOMM.ARC
/
TL.C
< prev
Wrap
Text File
|
1987-06-08
|
655b
|
46 lines
#include "stddef.h"
#include "dos.h"
#include "conio.h"
#include "litecomm.h"
main()
{
int ch;
COMM *ccb;
if (comm_opn(3,B2400,NPARITY,BIT8,STOP1,512,64) == ERR)
{
puts("Open Failure\n");
exit(1);
}
lc_setmdm(3,(DTR | RTS));
while(TRUE)
{
if(kbhit())
{
ch = getch();
switch (ch)
{
case 0x1b: break;
default: if(lc_put(3,ch) == ERR)
puts("Put Failed\n");
}
if (ch == 0x1b)
break;
}
if((ch = lc_get(3)) != ERR)
if (ch == '\r')
{
putch(ch);
putch(0x0a);
}
else
if (ch != 0x0a)
putch(ch);
}
comm_close(3);
exit(0);
}